﻿using System;
namespace HuaCheng.Model
{
    /// <summary>
    /// 状态上传数据包的数据
    /// </summary>
    public class ChannelState
    {
        //当前工步起始时间
        public DateTime BeginTime{get;set;}
        //当前工步接续时间
        public DateTime ContiTime { get; set; }
        //当前包被处理的时间
        public DateTime NowTime { get; set; }
        //当前工步已经被执行的时间
        public TimeSpan ExecutionTime { get; set; }
        //当前工步的工步号
        public int CurrStepNum { get; set; }
        //当前工步起始包序
        public int BeginSeq { get; set; }
        //当前工步的暂停包序（默认为0）
        public int PauseSeq { get; set; }
        //当前工步的接续包序（默认为0）
        public int ContinueSeq { get; set; }
        //当前包序
        public int CurrentSeq { get; set; }
        //测试号
        public string TestId { get; set; }
        // 接收到数据的时间
        public string time { get; set; }
        // 设备地址
        public string IP { get; set; }
        // 工步号
        public int StepNum { get; set; }
        // 通道效率
        public int channelEfficiency { get; set; }
        //工步方案号
        public int StepScheme { get; set; }
        //工步类型
        public int StepType { get; set; }
        //工步名称
        public string StepName { get; set; }
        //循环号
        public string Cycle { get; set; }
        //记录时间
        public int TestTime { get; set; }
        //中位机号
        public int MID { get; set; }
        //柜号
        public int GID { get; set; }
        // 通道号
        public int CID { get; set; }
        // AC状态1,AC/DC侧IGBT状态保留位0,DC母线欠压故障
        public bool ACstate1_BusUnderVolt { get; set; }
        // AC状态1,AC/DC侧IGBT状态保留位1.相序错误
        public bool ACstate1_PhaseError { get; set; }
        //交流欠压
        public bool ACstate1_ACUnderVolt { get; set; }
        //交流失电
        public bool ACstate1_ACLoseVolt { get; set; }
        // AC/DC侧 AC FUSE状态
        public bool ACstate1_AC_fuse { get; set; }
        // 系统急停
        public bool ACstate1_emergency { get; set; }
        // AC/DC侧 过温故障
        public bool ACstate1_AC_overTemper { get; set; }
        // AC/DC侧 交流硬件过压
        public bool ACstate1_AC_ACOverVoltHard { get; set; }
        // AC/DC侧 直流硬件过压
        public bool ACstate1_AC_DCOverVoltHard { get; set; }
        // AC/DC侧 交流硬件过流
        public bool ACstate1_AC_ACOverCurrentHard { get; set; }               
        // AC/DC侧 参数设置错误
        public bool ACstate1_AC_paramError { get; set; }
        // AC/DC侧 交流软件过压
        public bool ACstate1_AC_ACOverVoltSoft { get; set; }
        // AC/DC侧 直流软件过压
        public bool ACstate1_AC_DCOverVoltSoft { get; set; }
        // AC/DC侧 交流软件过流
        public bool ACstate1_AC_ACOverCurrentSoft { get; set; }
        // AC/DC侧 交流接触器故障
        public bool ACstate1_AC_breakFault { get; set; }
        //AC/DC侧 电网故障 
        public bool ACstate1_gridFault { get; set; }

        // AC/DC故障
        public bool ACstate2_AC_fault { get; set; }
        // AC预充失败
        public bool ACstate2_AC_preChargeFault { get; set; }
        // UPS掉电故障
        public bool ACstate2_AC_UPS { get; set; }
        // 直流放电异常
        public bool ACstate2_DC_dischargeError { get; set; }
        // AC/DC侧 锁相环锁相成功
        public bool ACstate2_PLL { get; set; }
        // AC/DC侧 侧高压带电
        public bool ACstate2_AC_highVolt { get; set; }        
        // 交流预充电状态
        public bool ACstate2_AC_preCharge { get; set; }
        // 交流接触器状态   
        public bool ACstate2_AC_breakState { get; set; }
        //AC/DC风机（预留位8）
        public bool ACstate2_rsv8;
        // AC/DC工作状态
        public bool ACstate2_AC_workState { get; set; }
        // 直流放电状态
        public bool ACstate2_DC_dischargeState { get; set; }
        //预留位11
        public bool ACstate2_rsv11;
        //预留位12
        public bool ACstate2_rsv12;
        //预留位13
        public bool ACstate2_rsv13;
        //预留位14
        public bool ACstate2_rsv14;
        //预留位15
        public bool ACstate2_rsv15;

        // DC故障
        public bool DCstate1_DC_fault { get; set; }
        // 直流预充电故障
        public bool DCstate1_DC_preChargeFault { get; set; }
        //DC直流放电异常
        public bool DCstate1_dischargeError { get; set; }
        // DC接触器故障
        public bool DCstate1_DC_breakFault { get; set; }
        // DC输入电压硬件过压
        public bool DCstate1_DC_inputOverVoltHard { get; set; }
        // DC输出电压硬件过压
        public bool DCstate1_DC_outputOverVoltHard { get; set; }
        // DC负载电流硬件过流
        public bool DCstate1_DC_loadOverCurrentHard { get; set; }
        // DC电感电流硬件过流
        public bool DCstate1_DC_inductorOverCurrentHard { get; set; }
        // DC输入电压软件过压
        public bool DCstate1_DC_inputOverVoltSoft { get; set; }
        // DC输出电压软件过压
        public bool DCstate1_DC_outputOverVoltSoft { get; set; }
        // DC负载电流软件过流
        public bool DCstate1_DC_loadOverCurrentSoft { get; set; }
        // DC电感电流软件过流
        public bool DCstate1_DC_inductorOverCurrentSoft { get; set; }
        // DC过温
        public bool DCstate1_DC_overTemper { get; set; }
        // 系统急停
        public bool DCstate1_emergency { get; set; }
        //参数设置错误
        public bool DCstate1_paramError { get; set; }
        //母线欠压故障
        public bool DCstate1_BusUnderVolt { get; set; }

        // DC高压带电
        public bool DCstate2_DC_highVolt { get; set; }
        //开路电压标识
        public bool DCstate2_open_Volt { get; set; }
        //通道是否可用
        public bool DCstate2_Chl_Enable { get; set; }
        // DC/DC工作状态
        public bool DCstate2_DC_workState { get; set; }
        // 直流接触器状态
        public bool DCstate2_Contactor { get; set; }
        //直流放电状态
        public bool DCstate2_DC_dischargeState { get; set; }
        //暂态数据标识
        public int DCstate2_Temp_Data { get; set; }
        //预留位8
        public bool DCstate2_rsv8 { get; set; }
        //预留位9
        public bool DCstate2_rsv9 { get; set; }
        //预留位10
        public bool DCstate2_rsv10 { get; set; }
        //预留位11
        public bool DCstate2_rsv11 { get; set; }
        //预留位12
        public bool DCstate2_rsv12 { get; set; }
        //预留位13
        public bool DCstate2_rsv13 { get; set; }
        //预留位14
        public bool DCstate2_rsv14 { get; set; }
        //预留位15
        public bool DCstate2_rsv15 { get; set; }
        
        // 电压达到上限
        public bool DCoff_voltageUpper { get; set; }
        // 电压达到下限
        public bool DCoff_DCoffvoltageLower { get; set; }
        // 电流达到上限
        public bool DCoff_currentUpper { get; set; }
        // 电流达到下限
        public bool DCoff_currentLower { get; set; }
        // 时间到
        public bool DCoff_timeout { get; set; }
        // 温度到达上限值
        public bool DCoff_temperUpper { get; set; }
        // 温度到达下限值
        public bool DCoff_temperLower { get; set; }
        // 系统故障
        public bool DCoff_systemFault { get; set; }
        // 停机命令
        public bool DCoff_offCommand { get; set; }        
        //工况尾包结束
        public bool DCoff_LastPackEnd { get; set; }
        // 辅助通道温度保护
        public bool DCoff_ARM_auxTemper { get; set; }
        // 辅助通道电压保护
        public bool DCoff_ARM_auxVolt { get; set; }
        // ARM其它紧急保护
        public bool DCoff_ARM_emergency { get; set; }
        //DC停机预留位13
        public bool DCoff_rsv13 { get; set; }
        //DC停机预留位14
        public bool DCoff_rsv14 { get; set; }
        //DC停机预留位15
        public bool DCoff_rsv15 { get; set; }

        // DC输出电压
        public float DC_outputVolt { get; set; }
        // DC负载电流
        public float DC_loadCurrent { get; set; }
        // 负载温度
        public float DC_loadTemper { get; set; }
        // 环境温度
        public float DC_ambientTemper { get; set; }
        // 直流母线电压
        public float DC_busVolt { get; set; }
        // 充电容量
        public float chargeCap { get; set; }
        // 放电容量
        public float dischargeCap { get; set; }
        // 总容量
        public float totalCap { get; set; }
        //脉冲段号
        public int pulseNumber { get; set; }
        // 工步时间
        public float stepTime { get; set; }
        // 充电能量
        public float chargeEnergy { get; set; }
        // 放电能量
        public float dischargeEnergy { get; set; }
        // 总能量
        public float totalEnergy { get; set; }
        // 功率
        public float power { get; set; }
        // 电压差
        public float diffVolt { get; set; }
        // 电流差
        public float diffCurrent { get; set; }
        //BYD负载温度1
        public int bydLoadTemper1 { get; set; }
        //BYD负载温度2
        public int bydLoadTemper2 { get; set; }
        //BYD负载温度3
        public int bydLoadTemper3 { get; set; }
        //系统时间
        public string SysTime { get; set; }
        //通道运行状态
        public string faultStatus { get; set; }
    }
}
